package com.itheima.genericity;

import java.util.ArrayList;

public class generdemo04 {
    public static void main(String[] args) {
        GenericityImpl1<String> genericityImpl1=new GenericityImpl1<>();
        genericityImpl1.method("皮卡丘");
        GenericityImpl2 genericityImpl2=new GenericityImpl2();
        genericityImpl2.method(12);
    }
}
interface Genericity<E>{
    public abstract void method(E e);
}
class GenericityImpl2<Integer> implements Genericity<Integer>{
    @Override
    public void method(Integer integer) {
        System.out.println(integer);
    }
}
class GenericityImpl1<E> implements Genericity<E>{
    @Override
    public void method(E e) {
        System.out.println(e);
    }
}